<template>
	<view class="bg-h">
		<!-- <view class="bg-white mx-3 p-3 mt-3 box-s bo-r2" style=" height: 300upx;">
			直播占位
		</view> -->
		<view class="mx-3 p-3 mt-3 text-center">
			<view class="" style="color: #bb6d17; font-weight: 700; font-size: 40upx;">
				开奖时间
			</view>
			<view class="d-flex mt-1">
				<view class="span-10">
					<view class="">星期一：8点36分</view>
					<view class="">星期三：8点36分</view>
					<view class="">星期六：8点36分</view>
				</view>
				<view class="span-10">
					<view class="">星期二：8点26分</view>
					<view class="">星期四：8点26分</view>
					<view class="">星期五：8点26分</view>
					<view class="">星期日：8点26分</view>
				</view>
			</view>
		</view>
		<!-- <ad unit-id="adunit-09d174bd84226612" ad-type="video" ad-theme="white"></ad> -->
	</view>
</template>

<script>
	let videoAd = null;
	export default {
		data() {
			return {

			}
		},
		onLoad() {

			// #ifdef MP

			this.adLoad()
			// this.openVideoAd()

			// #endif

		},
		
		methods: {
			adLoad() {

				if (wx.createRewardedVideoAd) {

					videoAd = wx.createRewardedVideoAd({

						adUnitId: "adunit-22fc3b4802cf162d" //你的广告key

					})

					videoAd.onError(err => {})

					videoAd.onClose((status) => {

						if (status && status.isEnded || status === undefined) {

							//这里写广告播放完成后的事件

						} else {}

					})

					if (videoAd) {
						console.log(11)
						videoAd.show().catch(err => {
					
							// 失败重试
					
							// console.log("广告拉去失败")
					
							videoAd.load().then(() => videoAd.show())
					
						})
					
					}
				}
				

			},
			openVideoAd: function() {

				if (videoAd) {

					videoAd.show().catch(err => {

						// 失败重试

						// console.log("广告拉去失败")

						videoAd.load().then(() => videoAd.show())

					})

				}

			},
		}
	}
</script>

<style>
	page {
		background: #fffcf5;
	}
</style>
